package demo.hms.Live.contoller;

import demo.hms.Live.service.LiveService;
import demo.hms.customer.service.CustomerService;
import demo.hms.mybatis.entity.Live;
import demo.hms.mybatis.entity.Stay;
import demo.hms.util.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/live")
public class LiveController {
    @Resource
    private LiveService service;

    @RequestMapping(value = "/selectStay",method = RequestMethod.GET)
    public Result selectStay(Stay stay){
        return service.selectStay(stay);
    }
    @RequestMapping(value = "/insertStay",method = RequestMethod.GET)
    public Result insertStay(Live live){
        return service.insertStay(live);
    }
    @RequestMapping(value = "/cancelStay",method = RequestMethod.GET)
    public Result cancelStay(Live live){
        return service.cancelStay(live);
    }
    @RequestMapping(value = "/abrogateStay",method = RequestMethod.GET)
    public Result abrogateStay(Live live){
        return service.abrogateStay(live);
    }
    // 结算
    @RequestMapping(value = "/settlementLive", method = RequestMethod.GET)
    Result settlementLive(Live live){
        return service.settlementLive(live);
    }

}
